.class Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;
.super Landroid/widget/BaseAdapter;
.source "ConversationActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/zuiapps/common/feedback/ConversationActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "ReplyListAdapter"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field mContext:Landroid/content/Context;

.field mInflater:Landroid/view/LayoutInflater;

.field final synthetic this$0:Lcom/zuiapps/common/feedback/ConversationActivity;


# direct methods
.method public constructor <init>(Lcom/zuiapps/common/feedback/ConversationActivity;Landroid/content/Context;)V
    .registers 4
    .param p1, "this$0"    # Lcom/zuiapps/common/feedback/ConversationActivity;
    .param p2, "context"    # Landroid/content/Context;

    .prologue
    .line 228
    iput-object p1, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->this$0:Lcom/zuiapps/common/feedback/ConversationActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 229
    iput-object p2, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->mContext:Landroid/content/Context;

    .line 230
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->mContext:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 231
    return-void
.end method


# virtual methods
.method public getCount()I
    .registers 3

    .prologue
    .line 235
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->this$0:Lcom/zuiapps/common/feedback/ConversationActivity;

    # getter for: Lcom/zuiapps/common/feedback/ConversationActivity;->defaultConversation:Lcom/umeng/fb/model/Conversation;
    invoke-static {v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->access$200(Lcom/zuiapps/common/feedback/ConversationActivity;)Lcom/umeng/fb/model/Conversation;

    move-result-object v1

    invoke-virtual {v1}, Lcom/umeng/fb/model/Conversation;->getReplyList()Ljava/util/List;

    move-result-object v0

    .line 236
    .local v0, "replyList":Ljava/util/List;, "Ljava/util/List<Lcom/umeng/fb/model/Reply;>;"
    if-nez v0, :cond_e

    const/4 v1, 0x0

    :goto_d
    return v1

    :cond_e
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    goto :goto_d
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 281
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->this$0:Lcom/zuiapps/common/feedback/ConversationActivity;

    # getter for: Lcom/zuiapps/common/feedback/ConversationActivity;->defaultConversation:Lcom/umeng/fb/model/Conversation;
    invoke-static {v0}, Lcom/zuiapps/common/feedback/ConversationActivity;->access$200(Lcom/zuiapps/common/feedback/ConversationActivity;)Lcom/umeng/fb/model/Conversation;

    move-result-object v0

    invoke-virtual {v0}, Lcom/umeng/fb/model/Conversation;->getReplyList()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 286
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 11
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    const/4 v6, -0x2

    .line 243
    if-nez p2, :cond_7e

    .line 244
    iget-object v3, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->mInflater:Landroid/view/LayoutInflater;

    sget v4, Lcom/zuiapps/common/feedback/R$layout;->umeng_fb_list_item:I

    const/4 v5, 0x0

    invoke-virtual {v3, v4, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 246
    new-instance v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;

    invoke-direct {v0, p0}, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;-><init>(Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;)V

    .line 247
    .local v0, "holder":Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;
    sget v3, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_reply_date:I

    invoke-virtual {p2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyDate:Landroid/widget/TextView;

    .line 248
    sget v3, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_reply_content:I

    invoke-virtual {p2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    .line 250
    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 255
    :goto_28
    iget-object v3, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->this$0:Lcom/zuiapps/common/feedback/ConversationActivity;

    # getter for: Lcom/zuiapps/common/feedback/ConversationActivity;->defaultConversation:Lcom/umeng/fb/model/Conversation;
    invoke-static {v3}, Lcom/zuiapps/common/feedback/ConversationActivity;->access$200(Lcom/zuiapps/common/feedback/ConversationActivity;)Lcom/umeng/fb/model/Conversation;

    move-result-object v3

    invoke-virtual {v3}, Lcom/umeng/fb/model/Conversation;->getReplyList()Ljava/util/List;

    move-result-object v3

    invoke-interface {v3, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/umeng/fb/model/Reply;

    .line 257
    .local v2, "reply":Lcom/umeng/fb/model/Reply;
    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v6, v6}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 260
    .local v1, "layoutParams":Landroid/widget/RelativeLayout$LayoutParams;
    instance-of v3, v2, Lcom/umeng/fb/model/DevReply;

    if-eqz v3, :cond_85

    .line 261
    const/16 v3, 0x9

    invoke-virtual {v1, v3}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 262
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 265
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    sget v4, Lcom/zuiapps/common/feedback/R$drawable;->umeng_fb_reply_left_bg:I

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setBackgroundResource(I)V

    .line 266
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    iget-object v4, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->this$0:Lcom/zuiapps/common/feedback/ConversationActivity;

    invoke-virtual {v4}, Lcom/zuiapps/common/feedback/ConversationActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    sget v5, Lcom/zuiapps/common/feedback/R$color;->gray_4:I

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getColor(I)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V

    .line 274
    :goto_63
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyDate:Landroid/widget/TextView;

    invoke-static {}, Ljava/text/SimpleDateFormat;->getDateTimeInstance()Ljava/text/DateFormat;

    move-result-object v4

    invoke-virtual {v2}, Lcom/umeng/fb/model/Reply;->getDatetime()Ljava/util/Date;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 275
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    invoke-virtual {v2}, Lcom/umeng/fb/model/Reply;->getContent()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 276
    return-object p2

    .line 252
    .end local v0    # "holder":Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;
    .end local v1    # "layoutParams":Landroid/widget/RelativeLayout$LayoutParams;
    .end local v2    # "reply":Lcom/umeng/fb/model/Reply;
    :cond_7e
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;

    .restart local v0    # "holder":Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;
    goto :goto_28

    .line 268
    .restart local v1    # "layoutParams":Landroid/widget/RelativeLayout$LayoutParams;
    .restart local v2    # "reply":Lcom/umeng/fb/model/Reply;
    :cond_85
    const/16 v3, 0xb

    invoke-virtual {v1, v3}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 269
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 270
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    sget v4, Lcom/zuiapps/common/feedback/R$drawable;->umeng_fb_reply_right_bg:I

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setBackgroundResource(I)V

    .line 271
    iget-object v3, v0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter$ViewHolder;->replyContent:Landroid/widget/TextView;

    iget-object v4, p0, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;->this$0:Lcom/zuiapps/common/feedback/ConversationActivity;

    invoke-virtual {v4}, Lcom/zuiapps/common/feedback/ConversationActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x106000b

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getColor(I)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V

    goto :goto_63
.end method
